/<template>
  <div>
    <Item v-for="(item, index) in list" :key="index" :item="item"></Item>
    <!-- <div v-if="$store.state.list.length > 0">
      <dl v-for="(item, index) in $store.state.list" :key="index">
        <dt></dt><img :src="item.img" alt="" /></dt>
        <dd>{{ item.title }}</dd>
      </dl>
    </div> -->
    
  </div>
</template>

<script>
import Item from "@/components/item";
import axios from "@/untils/axios";
import "@/api/index";
import { mapState, mapActions } from "vuex";
export default {
  components: { Item },
  
  computed: {
    ...mapState(["list"]),
  },
  created() {
    axios.get("/api/list").then((res) => {
      this.bkpp(res.data.list);
    });
  },
  
  methods: {
    ...mapActions(["bkpp"]),
  },
};
</script>

<style>
</style>